<template>
  <div class="home">
    <el-card>
      <template slot="header">
        <div class="card-header">
          <span>Welcome to Legacy Vue 2 App</span>
        </div>
      </template>
      <div class="card-body">
        <p>This is a legacy Vue 2 application that has been integrated into a microfrontend architecture.</p>
        <el-divider></el-divider>
        <el-button type="primary" @click="navigateToDashboard">Go to Dashboard</el-button>
        <el-button @click="navigateToAbout">Learn More</el-button>
      </div>
    </el-card>
    
    <el-row :gutter="20" class="mt-4">
      <el-col :span="8">
        <el-card class="feature-card">
          <div class="feature-icon">📊</div>
          <h3>Analytics</h3>
          <p>Access comprehensive data visualization</p>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="feature-card">
          <div class="feature-icon">⚙️</div>
          <h3>Settings</h3>
          <p>Configure application preferences</p>
        </el-card>
      </el-col>
      <el-col :span="8">
        <el-card class="feature-card">
          <div class="feature-icon">🔄</div>
          <h3>Integration</h3>
          <p>Connect with new microfrontend services</p>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'Home',
  methods: {
    navigateToDashboard() {
      this.$router.push('/dashboard')
    },
    navigateToAbout() {
      this.$router.push('/about')
    }
  },
  mounted() {
    console.log('Home page mounted')
  }
}
</script>

<style scoped>
.home {
  padding: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-body {
  padding: 20px 0;
}

.mt-4 {
  margin-top: 16px;
}

.feature-card {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.feature-card h3 {
  margin-bottom: 8px;
  color: #1890ff;
}
</style>